package org.dxy.domain.port.repository;

import org.dxy.domain.model.aggregate.Equipment;

import java.util.Optional;

public interface IEquipmentRepository {

    /**
     * @description 根据设备id加载设备聚合
     * @param
     * @return
     * @date: 2025/6/13 23:15
     * @auther dxy
     */
    Equipment findById(Long equipmentId);


    /**
     * @description 保存设备数据
     * @param
     * @return
     * @date: 2025/6/13 23:16
     * @auther dxy
     */
    boolean save(Equipment equipment);

    /**
     * @description  设备是否存在
     * @param
     * @return
     * @date: 2025/6/12 23:27
     * @auther dxy
     */
    boolean existsById(Long equipmentId);
    
    
    /**
     * @description  
     * @param 	
     * @return 	
     * @date: 2025/6/22 14:48	
     * @auther dxy
     */
    boolean delete(Equipment equipment);

    /**
     * @description
     * @param
     * @return
     * @date: 2025/7/13 2:04
     * @auther dxy
     */
    boolean existsBySerialNumber(String serialNumber);
}

